<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <title>登录页面</title>
    <style>
        body {
            font-family: 'Arial', sans-serif;
            background-color: #f2f2f2;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
        }

        .login-container {
            width: 350px;
            padding: 40px 30px;
            background-color: #ffffff;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            box-sizing: border-box;
        }

        .login-title {
            text-align: center;
            margin-bottom: 30px;
            color: #333333;
            font-size: 24px;
            font-weight: 600;
        }

        .input-group {
            margin-bottom: 20px;
        }

        .input-group label {
            display: block;
            margin-bottom: 8px;
            color: #555555;
            font-size: 14px;
            font-weight: 500;
        }

        .input-group input[type="text"],
        .input-group input[type="password"] {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #dddddd;
            border-radius: 6px;
            font-size: 14px;
            transition: border-color 0.3s;
            box-sizing: border-box;
        }

        .input-group input[type="text"]:focus,
        .input-group input[type="password"]:focus {
            border-color: #4CAF50;
            outline: none;
        }

        .btn-login {
            width: 100%;
            padding: 12px;
            background-color: #4CAF50;
            border: none;
            color: white;
            font-size: 16px;
            font-weight: 500;
            border-radius: 6px;
            cursor: pointer;
            transition: background-color 0.3s;
            margin-top: 10px;
        }

        .btn-login:hover {
            background-color: #45a049;
        }

        .register-link {
            margin-top: 20px;
            text-align: center;
            font-size: 14px;
            color: #666666;
        }

        .register-link a {
            text-decoration: none;
            color: #2196F3;
            font-weight: 500;
            transition: color 0.3s;
        }

        .register-link a:hover {
            color: #0b7dda;
            text-decoration: underline;
        }

        /* 新增的响应式设计 */
        @media (max-width: 480px) {
            .login-container {
                width: 90%;
                padding: 30px 20px;
            }
        }
    </style>
</head>
<body>

<div class="login-container">
    <div class="login-title">用户登录</div>
    <form action="loginServlet" method="post">
        <div class="input-group">
            <label for="txtname">用户名</label>
            <input type="text" id="txtname" name="txtname" required>
        </div>
        <div class="input-group">
            <label for="txtpwd">密码</label>
            <input type="password" id="txtpwd" name="txtpwd" required>
        </div>
        <div class="input-group">
            <input type="submit" value="登录" class="btn-login">
        </div>
        <div class="register-link">
            <p>没有账号？<a href="reg.jsp">立即注册</a></p>
        </div>
    </form>
</div>

</body>
</html>
